package com.example.cxf.service;

/**
 * @author Mr.yuan
 * @version v1.0
 * @date 2019/12/31 19:16
 **/

import com.example.cxf.domain.Student;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import java.util.ArrayList;
import java.util.List;

@WebService(
        serviceName="helloService",//【对外发布的服务名 】：需要见名知意
        targetNamespace="http://service.cxf.example.com",//【名称空间】：【实现类包名的反缀】
        endpointInterface = "com.example.cxf.service.IHello")//【服务接口全路径】  【接口的包名】
@Service
public class IHelloService implements IHello {
    @Override
    public List<Student> sayHello(String userName) {
        System.out.println("=======================>"+userName);
        List<Student> stuList = new ArrayList<>();
        Student student = new Student();
        student.setAge(18);
        student.setScore(700);
        student.setName(userName);
        stuList.add(student);
        return stuList;
    }
}
